//
//  JTableHelper.h
//
//  jhf
//
//  Created by 计海峰 on 2020/8/16.
//

#import <Foundation/Foundation.h>
#import "TableVC.h"

NS_ASSUME_NONNULL_BEGIN

@interface JTableHelper : NSObject

// MARK: - push
/// 跳转到vc
/// @param vc vc
void routerTo(UIViewController *vc);


/// 跳转到vc
/// @param vmStr vmStr
/// @param title navbar title
TableVC* routerToByRowsVM(NSString *vmStr, NSString *title);

/// 跳转到vc
/// @param vmStr vmStr
/// @param title navbar title
/// @param keys 参数key
/// @param values 参数value
TableVC* routerToByPageVM(NSString *vmStr, NSString *title, NSArray *keys, NSArray *values);

/// push 返回上一级
void navBack(void);

/// push 返回上级
/// @param num 数量
void navBackTo(int num);

// MARK: - present
/// 跳转到vc
/// @param vc vc
void presentTo(UIViewController *vc, BOOL isNav);

/// 跳转到vc
/// @param vmStr vmStr
/// @param title navbar title
TableVC* presentToByRowsVM(NSString *vmStr, NSString *title, BOOL isNav);

/// 跳转到vc
/// @param vmStr vmStr
/// @param title navbar title
/// @param keys 参数key
/// @param values 参数value
TableVC* presentToByPageVM(NSString *vmStr, NSString *title, NSArray *keys, NSArray *values, BOOL isNav);

/// dismiss 返回上一级
void dismissBack(void);

// MARK: - remove
/// 删除navs 里面的几个table 配置的 controller
/// @param vms 对应的key
/// @param nav nav 可为空 默认取当前的
void removeNavTabVCs(NSArray <NSString *>*vms, UINavigationController* _Nullable nav);

/// 删除navs 里面的几个table 配置的 controller
/// @param keys 对应绑定的 bindKey
/// @param nav nav 可为空 默认取当前的
void removeNavVcByKeys(NSArray <NSString *> *keys, UINavigationController* _Nullable nav);

///// 顶部vc
//+ (UIViewController *)topVC;
UIViewController *currentTopVC(void);

@end

NS_ASSUME_NONNULL_END
